package com.lshtv.web;

import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * 首页，指向默认首页页面
 * 
 * @author danjingyu
 * @version $Id: IndexController.java, v 0.1 2013-5-11 下午4:55:15 danjingyu Exp $
 */
@Controller
public class BackstageController {

    @RequestMapping(value = "/login.htm")
    public ModelAndView login(String userName, String password, ModelMap modelMap) {
        ModelAndView view = new ModelAndView("home/login");
        if (StringUtils.equals("Administrator", userName) && StringUtils.equals("123", password)) {
            return new ModelAndView("home/article_list");
        }
        return view;
    }
}
